package types

// A list of task types.

// SchedulerRecordSettle 结算给卖家的结算记录
const ScheduleSettleRecord = "schedule:settle:record"

const ScheduleScanAttachmentLog = "schedule:scan:attachmentLog" // ##25.02.11##

const SchedulePublishKbEntry = "schedule:publish:kbEntry"
const SchedulePublishPost = "schedule:publish:post"

const ScheduleScanPromotionActivity = "schedule:scan:promotionActivity"
const ScheduleScanPromotionCoupon = "schedule:scan:promotionCoupon"
const ScheduleScanUpdatedGorseCache = "schedule:scan:updatedGorseCache"
const ScheduleScanAttachmentLogDelete = "schedule:scan:attachmentLogDelete"

const PeriodicityClearIntegralCache = "periodicity:clear:integral:cache"

// DeferedCloseOrder 延迟关闭订单
const DeferedCloseOrder = "defer:close:order"

const DeferedStockSubtractRevert = "defer:stock:revert"

type DeferedCloseOrderPayload struct { // #24.09.28#
	OrderSn string `json:"orderSn"`
}

type ProductVariationStock struct {
	Id    uint64 `json:"id"`
	Stock uint32 `json:"stock"`
}

type DeferedStockSubtractRevertPayload struct {
	Stocks []*ProductVariationStock `json:"stocks"`
}

// PaySuccessNotifyUserPayload pay success notify user
type PaySuccessNotifyUserPayload struct {
	UserId  int64  `json:"userId"`
	OrderSn string `json:"orderSn"`
}

type EmailDeliveryPayload struct {
	UserId     int64  `json:"userId"`
	TemplateId string `json:"tmplId"`
}

type ImageResizePayload struct {
	SourceUrl string `json:"sourceUrl"`
}

type PublishBlogPostPayload struct {
	PostID uint64 `json:"postID"`
}

const ScheduleEmailDelivery = "schedule:email:deliver"
const ScheduleImageResize = "schedule:image:resize"

// MsgPaySuccessNotifyUser 支付成功通知用户
const MsgPaySuccessNotifyUser = "msg:pay_success:notify_user"
